<template>
  <div>
    <h1>BTF</h1>
    <el-button @click="getFromKylin"> 主要按钮 </el-button>
  </div>
</template>

<script>
import axios from 'axios'
export default {
    data() {
        return {
            
        }
    },
    methods: {
        getFromKylin() {
            console.log('kylin')
            let data =  { "sql":"select part_dt, sum(price) as total_sold, count(distinct seller_id) as sellers from kylin_sales group by part_dt order by part_dt", "project":"learn_kylin"  }
            axios({
                url: 'http://101.200.207.137:7070/kylin/api/query',
                method: 'post',
                headers: {
                    'Content-Type': 'application/json'
                },
                auth: {
                    username: 'ADMIN',
                    password: 'KYLIN'
                },
                data: data,        
                }).then((res) => {
                    console.log(res)
                })           
        }
    }
}
</script>

<style>
</style>
